/**
 * 
 */
package cen5501c.common;

import static org.junit.Assert.*;

import java.text.ParseException;
import java.util.Date;

import org.junit.Test;

/**
 * @author Jiangyan Xu
 *
 */
public class CommonUtilTest {

	/**
	 * Test method for {@link cen5501c.common.CommonUtil#getDateAsRfc822String(java.util.Date)}.
	 */
	@Test
	public void testGetDateAsRfc822String() {
		fail("Not yet implemented");
	}

	/**
	 * Test method for {@link cen5501c.common.CommonUtil#getDateFromRfc822String(java.lang.String)}.
	 * @throws ParseException 
	 */
	@Test
	public void testGetDateFromRfc822String() throws ParseException {
		String dateString = "14 Feb 2002 23:37:03 -0800";
		Date date = CommonUtil.getDateFromRfc822String(dateString);
		String dateString1 = "\"14 Feb 2002 23:37:03 -0800\"";
		Date date1 = CommonUtil.getDateFromRfc822String(dateString);
	}
	
	/**
	 * Test method for {@link cen5501c.common.CommonUtil#getDateFromRfc822String(java.lang.String)}.
	 * @throws ParseException 
	 */
	@Test(expected = ParseException.class)
	public void testGetDateFromRfc822StringWithException() throws ParseException {
		String dateString = "\"14 Feb 2002 23:37:03 -0800";
		Date date = CommonUtil.getDateFromRfc822String(dateString);
	}
}
